<script language="javascript">
	function sendFile(frm) {ldelim}
		if (checkFile(frm.fileup.value))  {ldelim}
			document.getElementById("upload_message").style.display="";
			processForm('uploadForm');
		{rdelim} else  {ldelim}
			alert('{$lang.invaliduploadmessage}');
		{rdelim}
	{rdelim}
	function upAction(act) {ldelim}
		var forma = document.getElementById("formcommand");
		forma.action.value=act;
		forma.submit();
	{rdelim}
</script>

<center>
<div id="uploadfilediv">
<p class="usermessage">{$lang.uploadmessage}</p>
<form method="post" id="uploadForm" enctype="multipart/form-data">
	<input type="hidden" name="action" id="action" value="fileupload"/>
	<input type="hidden" name="op" id="op" value="upload"/>
	<table>
		<tr>
			<td style="text-align: center"><input type="file" name="fileup" id="fileup"/></td>
		</tr>
		<tr>
		<td style="text-align: right">
			{include file="button.tpl" name=$lang.cancel action="upAction('list')"}&nbsp;
			{include file="button.tpl" name=$lang.ok action="sendFile(this.form)"}
		</td>
		</tr>
	</table>
</form>
</div>
<div id="upload_message" style="display: none">
	<p class="usermessage">{$lang.uploading}</p>
</div>
<form id="formcommand" method="post">
	<input type="hidden" name="action" id="action" value=""/>
</form>

<center>